<?php
namespace app\api\model;

use think\Model;

class UserCard extends Base{
    protected $name = 'user_card';
    protected $updateTime = false;

    public function getStatusAttr($val){
        $status = [1 => '可使用', 2 => '已使用', 3 => '已过期'];
        return $status[$val];
    }

    public function getPayTimeAttr($val){
        if(!$val){
            return '-';
        }

        return date('Y-m-d H:i:s', $val);
    }
}